package com.intretech.tj.mqtt.entity;

import lombok.Getter;
import lombok.Setter;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;

@Getter
@Setter
public class QosMessageInfo extends MessageInfo {

    /**
     * 消息接收情况结果计数<br/>
     * 为了加速判断
     */
    private AtomicInteger count = new AtomicInteger();

    /**
     * 回复成功的客户端id列表
     */
    private final List<String> succeedList = new CopyOnWriteArrayList<>();

    public QosMessageInfo(MessageInfo messageInfo) {
        super(messageInfo.getClientID(), messageInfo.getMessage());
    }
}
